package com.example.showcase.common.handler;

import com.example.showcase.common.ShowcasePacket;
import com.example.showcase.common.AbstractBizHandler;
import com.example.showcase.common.packets.GroupMsgReqBody;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.tio.core.ChannelContext;

/**
 * 心跳处理
 *
 * @author tanyaowu
 * 2017年3月27日 下午9:51:28
 */
@Service
public class HeartbeatReqHandler extends AbstractBizHandler<GroupMsgReqBody> {
    private static Logger log = LoggerFactory.getLogger(HeartbeatReqHandler.class);

    public HeartbeatReqHandler() {
    }

    /**
     * @return
     * @author tanyaowu
     */
    @Override
    public Class<GroupMsgReqBody> bodyClass() {
        return GroupMsgReqBody.class;
    }

    /**
     * @param packet
     * @param bsBody
     * @param channelContext
     * @return
     * @throws Exception
     * @author tanyaowu
     */
    @Override
    public Object handler(ShowcasePacket packet, GroupMsgReqBody bsBody, ChannelContext channelContext) throws Exception {
        //心跳消息,啥也不用做
        return null;
    }
}
